/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package bean;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 *
 * @author Charles Gesser
 */
@Entity
@Table(name = "COMPRAS")
@NamedQueries({
    @NamedQuery(name = "Compras.findAll", query = "SELECT c FROM Compras c")})
public class Compras implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "COM_COD")
    private Integer comCod;
    @Basic(optional = false)
    @Column(name = "COM_CLI")
    private int comCli;
    @Column(name = "COM_DTA")
    @Temporal(TemporalType.TIMESTAMP)
    private Date comDta;
    @Column(name = "COM_OBS")
    private String comObs;

    public Compras() {
    }

    public Compras(Integer comCod) {
        this.comCod = comCod;
    }

    public Compras(Integer comCod, int comCli) {
        this.comCod = comCod;
        this.comCli = comCli;
    }

    public Integer getComCod() {
        return comCod;
    }

    public void setComCod(Integer comCod) {
        this.comCod = comCod;
    }

    public int getComCli() {
        return comCli;
    }

    public void setComCli(int comCli) {
        this.comCli = comCli;
    }

    public Date getComDta() {
        return comDta;
    }

    public void setComDta(Date comDta) {
        this.comDta = comDta;
    }

    public String getComObs() {
        return comObs;
    }

    public void setComObs(String comObs) {
        this.comObs = comObs;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (comCod != null ? comCod.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Compras)) {
            return false;
        }
        Compras other = (Compras) object;
        if ((this.comCod == null && other.comCod != null) || (this.comCod != null && !this.comCod.equals(other.comCod))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "bean.Compras[ comCod=" + comCod + " ]";
    }
    
}
